package main

import (
	"fmt"
	"net"
)

func main() {
	//主动连接服务器
	conn, err := net.Dial("tcp", "127.0.0.1:8888")
	if err != nil {
		fmt.Println("连接失败：", err)
	}
	defer conn.Close()
	//发送数据
	conn.Write([]byte("are you ok，你好吗？"))
	fmt.Println("发送数据完毕")
}
